/*
 * Copyright 2010. 
 * 
 * This document may not be reproduced, distributed or used 
 * in any manner whatsoever without the expressed written 
 * permission of xrkol Corp. 
 * 
 * $Rev: Rev $
 * $Author: Author $
 * $LastChangedDate: LastChangedDate $
 *
 */

package com.xrkol.sharelib.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xrkol.sharelib.dao.AdultDao;
import com.xrkol.sharelib.entity.Adult;
import com.xrkol.sharelib.service.AdultService;

/**
 * @author peng.xia
 *
 */
@Service
@Transactional
public class AdultServiceImpl implements AdultService{
    
    @Autowired
    private AdultDao guardianDao;

    @Override
    public void save(Adult entity) {
        this.guardianDao.save(entity);
    }

    @Override
    public void update(Adult entity) {
        this.guardianDao.update(entity);
    }

    @Override
    public void delete(String id) {
        this.guardianDao.delete(id);
    }

    @Override
    public Adult findById(String id) {
        return this.guardianDao.findById(id);
    }

    @Override
    public Adult findByNameAndPhone(String name, String phone) {
        return this.guardianDao.findByNameAndPhone(name, phone);
    }

    @Override
    public Adult findByUserId(String userId) {
        return this.guardianDao.findByUserId(userId);
    }

    @Override
    public List<Adult> listAll(Integer page) {
        return this.guardianDao.listAll(page);
    }

    @Override
    public List<Adult> getAll() {
        return this.guardianDao.getAll();
    }


}
